"""
    select 方法测试
"""

from select import *
from socket import *

#创建几个IO对象
sock=socket()
sock.bind(("0.0.0.0",1234))
sock.listen(3)

sock1 =socket(AF_INET,SOCK_DGRAM)

file =open("16.txt")

print("开始监控IO")
rs,ws,xs=select([sock,sock1,file],[sock1],[],3)
print("rlist:",rs)
print("wlist:",ws)
print("xlist:",xs)









































